package mx.itesm.wakapanda;



import org.cocos2d.nodes.CCDirector;
import org.cocos2d.sound.SoundEngine;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class Opciones extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		
		Context contexto = this;
		SoundEngine.sharedEngine().preloadEffect(contexto,R.raw.secondary_soundscape);
		SoundEngine.sharedEngine().playSound(contexto, R.raw.secondary_soundscape,
				true);
		
		setContentView(R.layout.options_menu);
		
		
	}
	
	public void modMusica (View v){
		
		
		
		if(SoundEngine.sharedEngine().getSoundsVolume() == 0){
			
			SoundEngine.sharedEngine().setSoundVolume(1f);
			
		} else{
			SoundEngine.sharedEngine().setSoundVolume(0f);
			
		}
		
	}
	
	
public void modEfectos (View v){
	
	
	
	if(SoundEngine.sharedEngine().getEffectsVolume() == 0){
		
		SoundEngine.sharedEngine().setEffectsVolume(1f);
		
	} else{
		SoundEngine.sharedEngine().setEffectsVolume(0f);
	}
	
		
	}
	
public void volver(View v){
		
	Context contexto = this;
	SoundEngine.sharedEngine().preloadEffect(contexto,R.raw.main_soundscape);
	SoundEngine.sharedEngine().playSound(contexto, R.raw.main_soundscape,
			true);
	onBackPressed();
	finish();
		
	}



public void onBackPressed(){

	
}




}
